package com.d3works.apps.contract.batch.service;

import com.d3works.apps.base.db.Batch;
import com.d3works.apps.base.service.administration.AbstractBatchService;
import com.d3works.apps.contract.batch.BatchContract;
import com.d3works.apps.contract.db.ContractBatch;
import com.d3works.db.Model;
import com.d3works.exception.D3worksException;
import com.d3works.inject.Beans;

public class BatchContractService extends AbstractBatchService {

  @Override
  protected Class<? extends Model> getModelClass() {
    return ContractBatch.class;
  }

  @Override
  public Batch run(Model model) throws D3worksException {
    ContractBatch contractBatch = (ContractBatch) model;
    return Beans.get(BatchContract.class).run(contractBatch);
  }
}
